#include"test.h"
typedef void (*back)
(double toatl,double now);
double total = 1024.0;
double speed = 1.0;
void download (back cd)
{
        double now=0;
        while(now<=total)
        {
                cd(total,now);
                usleep(5000);
                now+=speed;
        }
        printf("\ndownload %.2lfmb done\n",now);
}
void upload(back cd)
{
    double now = 0;
    while(now <= total)
    {
        cd(total, now);
        usleep(5000); 
        now += speed;
    }
    printf("\nupdown %.2lfmb done\n",now);
}
int main()
{
    download(deplay);
    upload(deplay);
    return 0;
}
